package com.ly.cloud.remote.feign.fallback;

import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;

import com.ly.cloud.remote.feign.DemoServiceFeignClient;

/**
 * 调用异常处理
 * @author FORDSEA
 * @date 2018年12月7日 下午5:11:50
 */
@Component
public class DemoServiceFeignClientFallback implements DemoServiceFeignClient {
	
	private static final Logger logger = Logger.getLogger(DemoServiceFeignClientFallback.class);

	/*@Override
	public WebResponse<UserDTO> get(String userId) {
		logger.warn("跨服务失败，调用备用方案！");
		String json = (String) CloudCacheHelper.getDbCache().get(CACHE_KEY + userId);
		if(StringUtils.isNotEmpty(json)) {
			return new WebResponse<UserDTO>().success(JSON.parseObject(json, UserDTO.class));
		}
		return null;
	}
	
	@Override
	public Map<String, Object> commonSaveLinkTransactionStatus(Map<String, Object> params) {
		logger.error("调用失败回调方法");
		return null;
	}*/

}
  